package com.clear.adapter.object;


/**
 * 对象适配器：区别于类适配器，采用组合的方式实现适配器功能
 */
public class ObjectAdapter implements Target {
    // todo 组合需要被适配的类
    private Adapter adapter;

    public ObjectAdapter(Adapter adapter) {
        this.adapter = adapter;
    }

    @Override
    public void request() {
        adapter.specificRequest();
    }
}
